﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using simpleHotel.Business;
using simpleHotel.Data;
using simple.Utilities;

namespace simpleHotel.Web
{
    public partial class Contact : PageBase
    {
        protected void btnContact_Click(object sender, EventArgs e)
        {
            simpleHotel.Business.Contact contact = new Business.Contact();

            contact.FullName = txtFullName.Text;
            contact.Email = txtEmail.Text;
            contact.EmailContent = txtContent.Text;
            contact.Title = txtSubject.Text;

            Contacts contacts = new Contacts();
            contacts.InsertContact(contact);

            contact.FullName = string.Empty;
            contact.Email = string.Empty;
            contact.EmailContent = string.Empty;
            contact.Title = string.Empty;
        }
    }
}